package org.admin.admin;

import org.hibernate.Session;
import org.huntaway.admin.po.SysDict;
import org.huntaway.hibernate.imp.HibernateUtil;


public class App 
{
    public static void main( String[] args )
    {
        System.out.println("Maven + Hibernate + MySQL");
        Session session = HibernateUtil.getSessionFactory().openSession();
        
        session.beginTransaction();
        SysDict stock = new SysDict();
        
        stock.setCode("4715");
        stock.setName("GENM");
        
        session.save(stock);
       
        
        
        //session.delete(stock);
        
        session.getTransaction().commit();
        
        
    }
}
